/* =====================
   全局基础样式优化
===================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html,
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
        sans-serif;
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    width: 100%;
}

/* =====================
     单选框样式优化
  ===================== */
.form-check-input {
    width: 1rem; /* 调整单选框宽度 */
    height: 1rem; /* 调整单选框高度 */
    margin-top: 0.25rem; /* 调整垂直对齐 */
}

/* 确保选中状态的样式也正常 */
.form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.form-check-label {
    margin-left: 0.5rem; /* 增加标签与单选框之间的间距 */
    line-height: 1.5; /* 确保行高与单选框对齐 */
}

/* =====================
     暗黑模式按钮优化
  ===================== */
[data-bs-theme='dark'] .btn-outline-primary {
    color: #93c5fd;
    border-color: #93c5fd;
}

[data-bs-theme='dark'] .btn-outline-danger {
    color: #f87171;
    border-color: #f87171;
}

[data-bs-theme='dark'] .btn-outline-success {
    color: #34d399;
    border-color: #34d399;
}

[data-bs-theme='dark'] .btn-outline-secondary {
    color: #cbd5e1;
    border-color: #94a3b8;
}

/* hover 效果增强 */
[data-bs-theme='dark'] .btn-outline-primary:hover {
    background-color: #93c5fd;
    color: #0f172a;
}

[data-bs-theme='dark'] .btn-outline-danger:hover {
    background-color: #f87171;
    color: #0f172a;
}

[data-bs-theme='dark'] .btn-outline-success:hover {
    background-color: #34d399;
    color: #0f172a;
}

[data-bs-theme='dark'] .btn-outline-secondary:hover {
    background-color: #94a3b8;
    color: #0f172a;
}

/* =====================
     表格样式优化
  ===================== */
.table {
    background-color: transparent;
    color: var(--bs-body-color);
}

[data-bs-theme='dark'] .table thead {
    background-color: #1f2937;
    color: #f1f5f9;
}

[data-bs-theme='dark'] .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.03);
}

/* =====================
     卡片、模态框、阴影优化
  ===================== */
.card,
.modal-content {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    border: 1px solid var(--bs-border-color, #dee2e6);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

[data-bs-theme='dark'] .card,
[data-bs-theme='dark'] .modal-content {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

/* =====================
     标题兼容暗黑主题
  ===================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--bs-body-color);
}

/* =====================
     输入框优化（让form看起来更现代）
  ===================== */
.form-control {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    border: 1px solid var(--bs-border-color, #ced4da);
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* =====================
     响应式优化（适配小屏）
  ===================== */
@media (max-width: 576px) {
    .auth-card,
    .card,
    .modal-content {
        padding: 1rem;
    }

    .btn {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}
